<template>
<view class="not-data-box flex flex-column justify-center align-center">
  <image class="not-data-png" :src="notSearchPng"></image>
  <view class="not-data-text">暂无数据</view>
  <view class="not-data-btn mt20">
    <d-button @click="btnFn">{{ btnText }}</d-button>
  </view>
</view>
</template>

<script setup lang="ts">
import notSearchPng from '@/static/images/not-search.png'
defineOptions({ name: 'NotData' })

const props = defineProps({
  btnText: {
    type: String,
    default: '返回',
  }
})

const $emit = defineEmits(['notDataFn'])

function btnFn() {
  $emit('notDataFn')
}
</script>

<style scoped lang="scss">
.not-data-box {
  width: 100%;
  height: 100%;

  .not-data-png {
    width: 480rpx;
    height: 280rpx;
  }

  .not-data-text {
    color: #969799;
  }

  .not-data-btn {
    width: 100%;
    max-width: 400rpx;
  }
}
</style>
